package pl.edu.agh.io.gpstracker.dao;

import java.util.List;

import org.springframework.dao.DataAccessException;
import org.springframework.stereotype.Repository;

import pl.edu.agh.io.gpstracker.model.Track;

/**
 * 
 * @author wkedzior
 * 
 */
@Repository
public class TracksequenceDaoImpl extends GenericDaoImpl<Track, Long> implements
		TrackDao {

	public TracksequenceDaoImpl() {
		super(Track.class);
	}

	@SuppressWarnings("unchecked")
	@Override
	public List<Track> findTrackByUser(Integer userid)
			throws DataAccessException {
		return getHibernateTemplate().find("from  pl.edu.agh.io.gpstracker.model.Track where userId = ? ", new Object[]{userid});	
	}
	


}
